{include file="file:$theme_global/_header.tpl"}
<div class="title">
	{if $mca ne "default-user-profile"}
	<h1><a href="/profile/{$nav_username}" title="{$user.username}">{$user.username}</a></h1>
	{else}
	<h1>{$user.username}</h1>
	{/if}
</div>
<div id="sub">
	{include file="file:$theme_global/_user_image.tpl"}	
	<div class="sub">
		{include file="file:$theme_global/_user_nav.tpl"}
	</div>		
</div>
<div id="main">
	<div class="main">
		<div class="sec">
			<div class="title">
				<h2>Edit Caption</h2>
			{if $loggedInUsername eq $user.username}
				{if $media.is_default eq 0}
			<a href="/user/setprofileimage/id/{$media.id}" title="Set as your profile image" class="more">Set As Profile Image</a>
				{/if}
			<a href="/user/deleteimage/id/{$media.id}" title="Delete this image?" class="more">Delete</a>
			{/if}			
			</div>
			<div class="inner">
				{include file="file:$theme_global/_messages.tpl"}	
				<form method="post" action="/user/editimage" enctype="multipart/form-data">
					<fieldset>
						<div class="field">
							<label for="caption" class="caption">Caption</label>
							<div class="input">
								<input type="text" class="text" value="{$media.caption}" name="caption" id="caption" />
							</div>
						</div>
						<div class="field">
							<img src="{$media.full_image_url}" alt="" />
						</div>
					</fieldset>
					<div class="submit submit-alt">
						<input type="hidden" value="{$media.id}" name="id"/>
						<button type="submit" value="save" name="save" id="save" class="save">Save</button>
						<button type="submit" value="add" name="save" id="save-and-add" class="save-upload">Save and Upload Another</button>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>		
{include file="file:$theme_global/_footer.tpl"}